<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>亲子活动详情</title>

    <link rel="stylesheet" href="/main/css/style.css">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
</head>
<body>
<!--fixed remove-->
<section class="fixed" style="z-index:999;width: 100%;height: 100%;background-color: #000;position: fixed;left: 0;top: 0;"></section>
<section class="detail_page">
    <div>{%$content|default:''%}</div>
    <div class="relative">
        {%if $issign eq 1%}
        <span class="change_btn gray_btn">已报名</span>
        {%/if%}
        {%if  $issign eq 0&&$user.intergtal < $maxintegral%}
        <span class="change_btn gray_btn"> {%$maxintegral|default:0%}积分开启</span>
        {%/if%}
        {%if $issign eq 0&&$user.intergtal >= $maxintegral&& $joinnum<$maxnum  %}
        <span class="change_btn" onclick="sign()"> {%$maxintegral|default:0%}积分开启</span>
        {%/if%}
        {%if $issign eq 0 && $joinnum>=$maxnum %}
        <span class="change_btn gray_btn">报名截止</span>
        {%/if%}





    </div>
</section>
<!--是否报名成功-->
<div class="sign_up_box dno">
    <div class="wrap_box">
        <!--报名成功-->
        <span class="success dno">
            <span class="ewm"><img src="/main/img/ewm.jpg"></span>
                <span class="close"></span>
            </span>
            <span class="failed dno">
                <span class="close"></span>
            </span>
        <!--报名失败-->
    </div>
</div>
</body>
<script src="/main/js/jquery-1.12.3.min.js"></script>
<script src="/main/js/common.js"></script>
<script>
    $(function () {
        checkweichatevent();
        touchEvent();
        $(".sign_up_box .close").on('click',function () {
            $(".sign_up_box").fadeOut();
            refulsh();
        });
    })
    function sign() {

        $.ajax({
            type: "POST",
            url: "/api/doactivity.json",
            data: {id:{%$id|default:0%},tk_name:"{%$tk_name%}",tk_value:"{%$tk_value%}"},
            success: function(data){
            $(".sign_up_box").fadeIn();
            $(".sign_up_box").find('.success').fadeIn();

            },
             error:function(){
                 $(".sign_up_box").fadeIn();
                 $(".sign_up_box").find('.failed').fadeIn();

             }

        });

    }
</script>
</html>